package com.wing.member.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.member.model.entity.Member;
import com.wing.member.model.request.RegisterForm;

import java.util.List;
import java.util.Map;

/**
 * 用户信息-Service
 *
 * @author
 */
public interface MemberService extends IService<Member> {

	/**
	 * 注册
     *
	 * @param registerForm
	 * @return
	 */
	int register(RegisterForm registerForm);

    /**
     * 忘记密码
     *
     * @param registerForm
     * @return
     */
    int forgotPassword(RegisterForm registerForm);

    /**
     * 忘记支付密码
     *
     * @param registerForm
     * @return
     */
    int forgotPayPassword(Member member, RegisterForm registerForm);

    /**
     * 修改支付密码
     *
     * @param member
     * @param newPassword
     * @return
     */
    int changePayPassword(Member member, String newPassword);

    /**
     * 绑定
     *
     * @param registerForm
     * @param member
     * @return
     */
    int binding(RegisterForm registerForm, Member member);

    /**
     * 设置支付密码
     *
     * @param member
     * @param password
     * @return
     */
    int setPayPassword(Member member, String password);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<Member> pageList4app(Page page, Map<String, Object> params);

    /**
     * 修改密码
     * @param id
     * @param password
     * @param newPayPassword
     * @return
     */
    boolean updatePassword(Long id, String email, String password, String newPayPassword);

    /**
     * 列表
     *
     * @param params
     *
     * @return
     */
    List<Member> list(Map<String, Object> params);

    /**
     * 分页-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<Member> pageList(Page page, Map<String, Object> params);

    /**
     * 获取最大等级
     *
     * @param memberIdList
     *
     * @return
     */
    Long getRankIdByMaxRankNumber(List<Long> memberIdList);
}
